//3000/top/playlist?cat=华语
//3000/playlist/detail?id=${id}

//4000/api/movie/top250
//4000/api/movieDetail?id=60418ed19e3f3d1f6cf8f871
import axios from "axios"

class Http {
    static baseUrl = `http://122.112.161.135:`
    static request(url) {
        return (
            axios({
                url: this.baseUrl + url,
                method: 'GET',
            })
        )
    }
}

class getMusicHttp extends Http {
    static getMusicAllHttp() {
        return this.request(`3000/top/playlist?cat=华语`)
    }
    static getMusicDetailHttp(id) {
        return this.request(`3000/playlist/detail?id=${id}`)
    }
}

class getMovieHttp extends Http {
    static getMovieAllHttp() {
        return this.request(`4000/api/movie/top250`)
    }
    static getMovieDetailHttp(id) {
        return this.request(`4000/api/movieDetail??id=${id}`)
    }
}

export { getMusicHttp, getMovieHttp }